home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / src / GLperf3.12-src.lha / GLperf / Env.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-01  |  4.8 KB  |  115 lines

  1. #include <stdio.h>
  2. #ifdef WIN32
  3. #include <windows.h>
  4. #endif
  5. #include <GL/gl.h>
  6.  
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #ifndef TRUE
  11. #define TRUE 1
  12. #endif
  13. #ifndef FALSE
  14. #define FALSE 0
  15. #endif
  16.  
  17. typedef unsigned int Visual_ID;
  18.   
  19.  
  20. typedef struct {
  21.   int doubleBuffer;     /* boolean, TRUE if double buffered */
  22.   int stereo;           /* boolean, TRUE if stereo */
  23.   int rgba;             /* boolean, TRUE if rgba, FALSE if color index */
  24.  
  25.   int indexSize;        /* if NOT rgba, depth of color index color buffer*/
  26.  
  27.   int redSize;          /* if rgba, depth of red   color buffer channel */
  28.   int greenSize;        /* if rgba, depth of green color buffer channel */
  29.   int blueSize;         /* if rgba, depth of blue  color buffer channel */
  30.   int alphaSize;        /* if rgba, depth of alpha color buffer channel */
  31.  
  32.   int accumRedSize;     /* if rgba, depth of red   accum buffer channel */
  33.   int accumGreenSize;   /* if rgba, depth of green accum buffer channel */
  34.   int accumBlueSize;    /* if rgba, depth of blue  accum buffer channel */
  35.   int accumAlphaSize;   /* if rgba, depth of alpha accum buffer channel */
  36.  
  37.   int depthSize;        /* depth of depth buffer (z buffer) */
  38.   int stencilSize;      /* depth of stencil buffer */
  39. #ifdef GL_SGIS_multisample
  40.   int sampleBuffers;    /* number of multisample buffers */
  41.   int numSamples;       /* number of multisamples per pixel */
  42. #endif
  43.  
  44.   int auxBuffers;       /* number of auxiliary buffers */
  45.  
  46.   int level;            /* frame buffer level, <  0 implies underlay planes
  47.                          *                     == 0 implies main planes
  48.                          *                     >  0 implies overlay planes
  49.                          */
  50. #if defined(XWINDOWS)
  51.   Visual_ID visualId;    /* visual ID, X handle to visual descriptor */
  52.   int visualClass;      /* visual class, TrueColor, PseudoColor, etc. */
  53. #elif defined(WIN32)
  54.   int ipfd;             /* pixel format ID */
  55. #elif defined(__OS2__)
  56.   unsigned long visualId; /* pgl visual id */
  57. #endif
  58. } BufferConfig;
  59.  
  60. typedef struct {
  61.   int month;            /* month test was run, in the range [1-12] */
  62.   int day;              /* day   test was run, in the range [1-31] */
  63.   int year;             /* year  test was run, as a four digit number */
  64.   char *host;           /* what machine this test was run on */
  65.   char *hostOperatingSystem; /* what OS this test was run under */
  66.   char *hostOperatingSystemVersion; /* what OS version test was run under */
  67.   char *hostVendor;     /* who manufactured machine test was run on */
  68.   char *hostModel;      /* model designation of the host */
  69.   char *hostCPU;        /* CPU in the host */
  70.   char *hostCPUCount;   /* number of CPU's in host */
  71.   int hostMemorySize;   /* number of MB of memory installed on test machine */
  72.   char *hostPrimaryCacheSize; /* number of KB in primary cache */
  73.   char *hostSecondaryCacheSize; /* number of KB in secondary cache */
  74.   char *windowSystem;   /* name of target window system */
  75.   char *driverVersion;  /* graphics driver version */
  76.   char *glVendor;       /* OpenGL vendor name */
  77.   char *glVersion;      /* OpenGL version */
  78.   char *glExtensions;   /* OpenGL extension list */
  79.   char *glRenderer;     /* OpenGL renderer name, e.g. graphics device */
  80.   char *glClientVendor; /* OpenGL client vendor */
  81.   char *glClientVersion; /* OpenGL client version */
  82.   char *glClientExtensions; /* OpenGL client extensions */
  83.   char *gluVersion;     /* GLU version */
  84.   char *gluExtensions;  /* GLU extension list */
  85.   int directRender;     /* boolean, TRUE if direct rendering connection */
  86.   BufferConfig bufConfig; /* OpenGL buffer configuration, buffer depths etc. */
  87.   int windowWidth;      /* width of the window in pixels */
  88.   int windowHeight;     /* height of the window in pixels */
  89.   int screenWidth;      /* width of the screen in pixels */
  90.   int screenHeight;     /* height of the screen in pixels */
  91.  
  92. #if defined(XWINDOWS)
  93.   char *display;        /* name of the display, e.g. what node server is on */
  94.   char *glServerVendor; /* OpenGL server vendor */
  95.   char *glServerVersion; /* OpenGL server version */
  96.   char *glServerExtensions; /* OpenGL server extensions */
  97.   char *glxVersion;     /* GLX version, effective connection version */
  98.   char *glxExtensions;     /* GLX extensions, effective extension set */
  99.   int screenNumber;     /* which screen of the X server */
  100.   int sharedMemConnection;  /* boolean, TRUE if shared memory connection */
  101. #endif
  102. } EnvironmentInfo;
  103.  
  104. char *StringSearch(char *subject, char *pattern);
  105. int GetDateTime(int *month, int *day, int *year, int *hour, int *minute);
  106. int GetEnvironment(EnvironmentInfo *info);
  107. void FreeEnvironmentData(EnvironmentInfo *info);
  108. void NullEnvironmentData(EnvironmentInfo *info);
  109. void PrintEnvironment(FILE *stream, EnvironmentInfo *info, char *title,
  110.                       char *leader, int nameWidth, char *suffix);
  111.  
  112. #ifdef __cplusplus
  113. }
  114. #endif
  115.